#ifndef __ID2D_SWIG_H
#define __ID2D_SWIG_H
#include "msTypes.i"
#include "IUnknown_swig.h"
#include "IDXGI_swig.h"
#include "IDWrite_swig.h"

typedef enum D2D1_FILL_MODE
{
	D2D1_FILL_MODE_ALTERNATE = 0,
	D2D1_FILL_MODE_WINDING = 1,
	D2D1_FILL_MODE_FORCE_DWORD = 0xffffffff

} D2D1_FILL_MODE;

typedef enum D2D1_PATH_SEGMENT
{
	D2D1_PATH_SEGMENT_NONE = 0x00000000,
	D2D1_PATH_SEGMENT_FORCE_UNSTROKED = 0x00000001,
	D2D1_PATH_SEGMENT_FORCE_ROUND_LINE_JOIN = 0x00000002,
	D2D1_PATH_SEGMENT_FORCE_DWORD = 0xffffffff

} D2D1_PATH_SEGMENT;

typedef enum D2D1_FIGURE_BEGIN
{
	D2D1_FIGURE_BEGIN_FILLED = 0,
	D2D1_FIGURE_BEGIN_HOLLOW = 1,
	D2D1_FIGURE_BEGIN_FORCE_DWORD = 0xffffffff

} D2D1_FIGURE_BEGIN;

typedef enum D2D1_FIGURE_END
{
	D2D1_FIGURE_END_OPEN = 0,
	D2D1_FIGURE_END_CLOSED = 1,
	D2D1_FIGURE_END_FORCE_DWORD = 0xffffffff

} D2D1_FIGURE_END;

typedef enum D2D1_CAP_STYLE
{
	D2D1_CAP_STYLE_FLAT = 0,
	D2D1_CAP_STYLE_SQUARE = 1,
	D2D1_CAP_STYLE_ROUND = 2,
	D2D1_CAP_STYLE_TRIANGLE = 3,
	D2D1_CAP_STYLE_FORCE_DWORD = 0xffffffff
} D2D1_CAP_STYLE;

typedef enum D2D1_LINE_JOIN
{
	D2D1_LINE_JOIN_MITER = 0,
	D2D1_LINE_JOIN_BEVEL = 1,
	D2D1_LINE_JOIN_ROUND = 2,
	D2D1_LINE_JOIN_MITER_OR_BEVEL = 3,
	D2D1_LINE_JOIN_FORCE_DWORD = 0xffffffff
} D2D1_LINE_JOIN;

typedef enum D2D1_DASH_STYLE
{
	D2D1_DASH_STYLE_SOLID = 0,
	D2D1_DASH_STYLE_DASH = 1,
	D2D1_DASH_STYLE_DOT = 2,
	D2D1_DASH_STYLE_DASH_DOT = 3,
	D2D1_DASH_STYLE_DASH_DOT_DOT = 4,
	D2D1_DASH_STYLE_CUSTOM = 5,
	D2D1_DASH_STYLE_FORCE_DWORD = 0xffffffff

} D2D1_DASH_STYLE;

typedef enum D2D1_GEOMETRY_RELATION
{
	D2D1_GEOMETRY_RELATION_UNKNOWN = 0,
	D2D1_GEOMETRY_RELATION_DISJOINT = 1,
	D2D1_GEOMETRY_RELATION_IS_CONTAINED = 2,
	D2D1_GEOMETRY_RELATION_CONTAINS = 3,
	D2D1_GEOMETRY_RELATION_OVERLAP = 4,
	D2D1_GEOMETRY_RELATION_FORCE_DWORD = 0xffffffff
} D2D1_GEOMETRY_RELATION;

typedef enum D2D1_GEOMETRY_SIMPLIFICATION_OPTION
{
	D2D1_GEOMETRY_SIMPLIFICATION_OPTION_CUBICS_AND_LINES = 0,
	D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES = 1,
	D2D1_GEOMETRY_SIMPLIFICATION_OPTION_FORCE_DWORD = 0xffffffff

} D2D1_GEOMETRY_SIMPLIFICATION_OPTION;

typedef enum D2D1_COMBINE_MODE
{
	D2D1_COMBINE_MODE_UNION = 0,
	D2D1_COMBINE_MODE_INTERSECT = 1,
	D2D1_COMBINE_MODE_XOR = 2,
	D2D1_COMBINE_MODE_EXCLUDE = 3,
	D2D1_COMBINE_MODE_FORCE_DWORD = 0xffffffff
} D2D1_COMBINE_MODE;

typedef enum D2D1_ANTIALIAS_MODE
{
	D2D1_ANTIALIAS_MODE_PER_PRIMITIVE = 0,
	D2D1_ANTIALIAS_MODE_ALIASED = 1,
	D2D1_ANTIALIAS_MODE_FORCE_DWORD = 0xffffffff
} D2D1_ANTIALIAS_MODE;

typedef enum D2D1_TEXT_ANTIALIAS_MODE
{
	D2D1_TEXT_ANTIALIAS_MODE_DEFAULT = 0,
	D2D1_TEXT_ANTIALIAS_MODE_CLEARTYPE = 1,
	D2D1_TEXT_ANTIALIAS_MODE_GRAYSCALE = 2,
	D2D1_TEXT_ANTIALIAS_MODE_ALIASED = 3,
	D2D1_TEXT_ANTIALIAS_MODE_FORCE_DWORD = 0xffffffff
} D2D1_TEXT_ANTIALIAS_MODE;

typedef enum D2D1_RENDER_TARGET_TYPE
{
	D2D1_RENDER_TARGET_TYPE_DEFAULT = 0,
	D2D1_RENDER_TARGET_TYPE_SOFTWARE = 1,
	D2D1_RENDER_TARGET_TYPE_HARDWARE = 2,
	D2D1_RENDER_TARGET_TYPE_FORCE_DWORD = 0xffffffff
} D2D1_RENDER_TARGET_TYPE;

typedef enum D2D1_RENDER_TARGET_USAGE
{
	D2D1_RENDER_TARGET_USAGE_NONE = 0x00000000,
	D2D1_RENDER_TARGET_USAGE_FORCE_BITMAP_REMOTING = 0x00000001,
	D2D1_RENDER_TARGET_USAGE_GDI_COMPATIBLE = 0x00000002,
	D2D1_RENDER_TARGET_USAGE_FORCE_DWORD = 0xffffffff
} D2D1_RENDER_TARGET_USAGE;

typedef enum D2D1_PRESENT_OPTIONS
{
	D2D1_PRESENT_OPTIONS_NONE = 0x00000000,
	D2D1_PRESENT_OPTIONS_RETAIN_CONTENTS = 0x00000001,
	D2D1_PRESENT_OPTIONS_IMMEDIATELY = 0x00000002,
	D2D1_PRESENT_OPTIONS_FORCE_DWORD = 0xffffffff
} D2D1_PRESENT_OPTIONS;

typedef enum D2D1_EXTEND_MODE
{
	D2D1_EXTEND_MODE_CLAMP = 0,
	D2D1_EXTEND_MODE_WRAP = 1,
	D2D1_EXTEND_MODE_MIRROR = 2,
	D2D1_EXTEND_MODE_FORCE_DWORD = 0xffffffff
} D2D1_EXTEND_MODE;

typedef enum D2D1_BITMAP_INTERPOLATION_MODE
{
	D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR = 0,
	D2D1_BITMAP_INTERPOLATION_MODE_LINEAR = 1,
	D2D1_BITMAP_INTERPOLATION_MODE_FORCE_DWORD = 0xffffffff

} D2D1_BITMAP_INTERPOLATION_MODE;

typedef enum D2D1_GAMMA
{
	D2D1_GAMMA_2_2 = 0,
	D2D1_GAMMA_1_0 = 1,
	D2D1_GAMMA_FORCE_DWORD = 0xffffffff
} D2D1_GAMMA;

typedef enum D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS
{
	D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE = 0x00000000,
	D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_GDI_COMPATIBLE = 0x00000001,
	D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_FORCE_DWORD = 0xffffffff

} D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS;

typedef enum D2D1_OPACITY_MASK_CONTENT
{
	D2D1_OPACITY_MASK_CONTENT_GRAPHICS = 0,
	D2D1_OPACITY_MASK_CONTENT_TEXT_NATURAL = 1,
	D2D1_OPACITY_MASK_CONTENT_TEXT_GDI_COMPATIBLE = 2,
	D2D1_OPACITY_MASK_CONTENT_FORCE_DWORD = 0xffffffff
} D2D1_OPACITY_MASK_CONTENT;

typedef enum D2D1_DRAW_TEXT_OPTIONS
{
	D2D1_DRAW_TEXT_OPTIONS_NO_SNAP = 0x00000001,
	D2D1_DRAW_TEXT_OPTIONS_CLIP = 0x00000002,
	D2D1_DRAW_TEXT_OPTIONS_NONE = 0x00000000,
	D2D1_DRAW_TEXT_OPTIONS_FORCE_DWORD = 0xffffffff
} D2D1_DRAW_TEXT_OPTIONS;

typedef enum D2D1_LAYER_OPTIONS
{
	D2D1_LAYER_OPTIONS_NONE = 0x00000000,
	D2D1_LAYER_OPTIONS_INITIALIZE_FOR_CLEARTYPE = 0x00000001,
	D2D1_LAYER_OPTIONS_FORCE_DWORD = 0xffffffff
} D2D1_LAYER_OPTIONS;

typedef enum D2D1_WINDOW_STATE
{
	D2D1_WINDOW_STATE_NONE = 0x0000000,
	D2D1_WINDOW_STATE_OCCLUDED = 0x0000001,
	D2D1_WINDOW_STATE_FORCE_DWORD = 0xffffffff

} D2D1_WINDOW_STATE;

#ifndef D3DCOLORVALUE_DEFINED
typedef struct D3DCOLORVALUE
{
	FLOAT r;
	FLOAT g;
	FLOAT b;
	FLOAT a;

} D3DCOLORVALUE;
#define D3DCOLORVALUE_DEFINED
#endif

typedef D3DCOLORVALUE D2D_COLOR_F;
typedef D2D_COLOR_F D2D1_COLOR_F;

typedef struct D2D_POINT_2F
{
	FLOAT x;
	FLOAT y;

} D2D_POINT_2F;
typedef D2D_POINT_2F D2D1_POINT_2F;

struct D2D1_BEZIER_SEGMENT {
	D2D1_POINT_2F point1;
	D2D1_POINT_2F point2;
	D2D1_POINT_2F point3;
};
typedef struct D2D_RECT_F
{
	FLOAT left;
	FLOAT top;
	FLOAT right;
	FLOAT bottom;
	
} D2D_RECT_F;

typedef D2D_RECT_F D2D1_RECT_F;


typedef struct D2D_MATRIX_3X2_F
{
	FLOAT _11;
	FLOAT _12;
	FLOAT _21;
	FLOAT _22;
	FLOAT _31;
	FLOAT _32;

} D2D_MATRIX_3X2_F;

typedef D2D_MATRIX_3X2_F D2D1_MATRIX_3X2_F;

typedef struct D2D1_TRIANGLE
{
	D2D1_POINT_2F point1;
	D2D1_POINT_2F point2;
	D2D1_POINT_2F point3;

} D2D1_TRIANGLE;

typedef struct D2D1_ELLIPSE
{
	D2D1_POINT_2F point;
	FLOAT radiusX;
	FLOAT radiusY;

} D2D1_ELLIPSE;

typedef struct D2D1_STROKE_STYLE_PROPERTIES
{
	D2D1_CAP_STYLE startCap;
	D2D1_CAP_STYLE endCap;
	D2D1_CAP_STYLE dashCap;
	D2D1_LINE_JOIN lineJoin;
	FLOAT miterLimit;
	D2D1_DASH_STYLE dashStyle;
	FLOAT dashOffset;

} D2D1_STROKE_STYLE_PROPERTIES;

typedef UINT64 D2D1_TAG;

typedef struct D2D1_DRAWING_STATE_DESCRIPTION
{
	D2D1_ANTIALIAS_MODE antialiasMode;
	D2D1_TEXT_ANTIALIAS_MODE textAntialiasMode;
	D2D1_TAG tag1;
	D2D1_TAG tag2;
	D2D1_MATRIX_3X2_F transform;

} D2D1_DRAWING_STATE_DESCRIPTION;

typedef struct D2D1_PIXEL_FORMAT
{
	DXGI_FORMAT format;
	D2D1_ALPHA_MODE alphaMode;

} D2D1_PIXEL_FORMAT;

typedef struct D2D1_RENDER_TARGET_PROPERTIES
{
	D2D1_RENDER_TARGET_TYPE type;
	D2D1_PIXEL_FORMAT pixelFormat;
	FLOAT dpiX;
	FLOAT dpiY;
	D2D1_RENDER_TARGET_USAGE usage;
	D2D1_FEATURE_LEVEL minLevel;

} D2D1_RENDER_TARGET_PROPERTIES;

typedef struct D2D_SIZE_U
{
	UINT32 width;
	UINT32 height;

} D2D_SIZE_U;

typedef D2D_SIZE_U D2D1_SIZE_U;
typedef struct D2D1_HWND_RENDER_TARGET_PROPERTIES
{
	HWND hwnd;
	D2D1_SIZE_U pixelSize;
	D2D1_PRESENT_OPTIONS presentOptions;

} D2D1_HWND_RENDER_TARGET_PROPERTIES;

typedef struct D2D1_BITMAP_PROPERTIES
{
	D2D1_PIXEL_FORMAT pixelFormat;
	FLOAT dpiX;
	FLOAT dpiY;

} D2D1_BITMAP_PROPERTIES;

typedef struct D2D1_BITMAP_BRUSH_PROPERTIES
{
	D2D1_EXTEND_MODE extendModeX;
	D2D1_EXTEND_MODE extendModeY;
	D2D1_BITMAP_INTERPOLATION_MODE interpolationMode;

} D2D1_BITMAP_BRUSH_PROPERTIES;

typedef struct D2D1_BRUSH_PROPERTIES
{
	FLOAT opacity;
	D2D1_MATRIX_3X2_F transform;

} D2D1_BRUSH_PROPERTIES;

typedef struct D2D1_GRADIENT_STOP
{
	FLOAT position;
	D2D1_COLOR_F color;

} D2D1_GRADIENT_STOP;

typedef struct D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES
{
	D2D1_POINT_2F startPoint;
	D2D1_POINT_2F endPoint;

} D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES;

typedef struct D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES
{
	D2D1_POINT_2F center;
	D2D1_POINT_2F gradientOriginOffset;
	FLOAT radiusX;
	FLOAT radiusY;

} D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES;

typedef struct D2D1_ROUNDED_RECT
{
	D2D1_RECT_F rect;
	FLOAT radiusX;
	FLOAT radiusY;

} D2D1_ROUNDED_RECT;

typedef struct D2D_SIZE_F
{
	FLOAT width;
	FLOAT height;

} D2D_SIZE_F;
typedef D2D_SIZE_F D2D1_SIZE_F;

class ID2D1Geometry;
class ID2D1Brush;
typedef struct D2D1_LAYER_PARAMETERS
{
	D2D1_RECT_F contentBounds;
	ID2D1Geometry *geometricMask;
	D2D1_ANTIALIAS_MODE maskAntialiasMode;
	D2D1_MATRIX_3X2_F maskTransform;
	FLOAT opacity;
	ID2D1Brush *opacityBrush;
	D2D1_LAYER_OPTIONS layerOptions;
} D2D1_LAYER_PARAMETERS;

class ID2D1SimplifiedGeometrySink  : public IUnknown
{
public:
	virtual void SetFillMode(D2D1_FILL_MODE fillMode ) = 0;
	virtual void SetSegmentFlags(D2D1_PATH_SEGMENT vertexFlags ) = 0;
	virtual void BeginFigure(D2D1_POINT_2F startPoint, D2D1_FIGURE_BEGIN figureBegin ) = 0;
	virtual void AddLines( const D2D1_POINT_2F *points, UINT pointsCount) = 0;
	virtual void AddBeziers(const D2D1_BEZIER_SEGMENT *beziers,	UINT beziersCount ) = 0;
	virtual void EndFigure(	D2D1_FIGURE_END figureEnd ) = 0;
	virtual HRESULT Close() = 0;
}; 
class ID2D1Factory;

class ID2D1Resource  : public IUnknown
{
public:
	virtual void GetFactory(ID2D1Factory **factory ) const = 0;
}; 

class ID2D1StrokeStyle : public ID2D1Resource
{
public:
	virtual D2D1_CAP_STYLE GetStartCap() const = 0;
	virtual D2D1_CAP_STYLE GetEndCap() const = 0;
	virtual D2D1_CAP_STYLE GetDashCap() const = 0;
	virtual FLOAT GetMiterLimit() const = 0;
	virtual D2D1_LINE_JOIN GetLineJoin() const = 0;
	virtual FLOAT GetDashOffset() const = 0;
	virtual D2D1_DASH_STYLE GetDashStyle() const = 0;
	virtual UINT32 GetDashesCount() const = 0;
	virtual void GetDashes( FLOAT *dashes,UINT dashesCount ) const = 0;
}; 

class ID2D1TessellationSink  : public IUnknown
{
public:
	virtual void AddTriangles(const D2D1_TRIANGLE *triangles,	UINT trianglesCount ) = 0;
	virtual HRESULT Close()= 0;
}; 

class ID2D1Geometry : public ID2D1Resource
{
public:
	virtual HRESULT GetBounds( const D2D1_MATRIX_3X2_F *worldTransform,
		D2D1_RECT_F *bounds ) const = 0;
	virtual HRESULT GetWidenedBounds(
		FLOAT strokeWidth, ID2D1StrokeStyle *strokeStyle, const D2D1_MATRIX_3X2_F *worldTransform,
		FLOAT flatteningTolerance, D2D1_RECT_F *bounds ) const = 0;

	virtual HRESULT StrokeContainsPoint(D2D1_POINT_2F point,
		FLOAT strokeWidth, ID2D1StrokeStyle *strokeStyle, const D2D1_MATRIX_3X2_F *worldTransform,
		FLOAT flatteningTolerance, BOOL *contains ) const = 0;

	virtual HRESULT FillContainsPoint(
		D2D1_POINT_2F point, const D2D1_MATRIX_3X2_F *worldTransform,
		FLOAT flatteningTolerance, BOOL *contains ) const = 0;

	virtual HRESULT CompareWithGeometry( ID2D1Geometry *inputGeometry,
		const D2D1_MATRIX_3X2_F *inputGeometryTransform,
		FLOAT flatteningTolerance, D2D1_GEOMETRY_RELATION *relation ) const = 0;

	virtual HRESULT Simplify(
		D2D1_GEOMETRY_SIMPLIFICATION_OPTION simplificationOption,
		const D2D1_MATRIX_3X2_F *worldTransform, FLOAT flatteningTolerance,
		ID2D1SimplifiedGeometrySink *geometrySink ) const = 0;

	virtual HRESULT Tessellate(
		const D2D1_MATRIX_3X2_F *worldTransform, FLOAT flatteningTolerance,
		ID2D1TessellationSink *tessellationSink ) const = 0;

	virtual HRESULT CombineWithGeometry( ID2D1Geometry *inputGeometry,
		D2D1_COMBINE_MODE combineMode, const D2D1_MATRIX_3X2_F *inputGeometryTransform,
		FLOAT flatteningTolerance, ID2D1SimplifiedGeometrySink *geometrySink ) const = 0;

	virtual HRESULT Outline(const D2D1_MATRIX_3X2_F *worldTransform,
		FLOAT flatteningTolerance, ID2D1SimplifiedGeometrySink *geometrySink ) const = 0;

	virtual HRESULT ComputeArea( const D2D1_MATRIX_3X2_F *worldTransform,
		FLOAT flatteningTolerance, FLOAT *area ) const = 0;

	virtual HRESULT ComputeLength( const D2D1_MATRIX_3X2_F *worldTransform,
		FLOAT flatteningTolerance, FLOAT *length ) const = 0;

	virtual HRESULT ComputePointAtLength(
		FLOAT length, const D2D1_MATRIX_3X2_F *worldTransform,
		FLOAT flatteningTolerance, D2D1_POINT_2F *point,
		D2D1_POINT_2F *unitTangentVector ) const = 0;

	virtual HRESULT Widen(
		FLOAT strokeWidth, ID2D1StrokeStyle *strokeStyle,
		const D2D1_MATRIX_3X2_F *worldTransform, FLOAT flatteningTolerance,
		ID2D1SimplifiedGeometrySink *geometrySink ) const = 0;


	virtual HRESULT	GetWidenedBounds( FLOAT strokeWidth, ID2D1StrokeStyle *strokeStyle,
		const D2D1_MATRIX_3X2_F *worldTransform, D2D1_RECT_F *bounds ) const = 0;
	
	
	virtual HRESULT	StrokeContainsPoint(D2D1_POINT_2F point, FLOAT strokeWidth, ID2D1StrokeStyle *strokeStyle,
		const D2D1_MATRIX_3X2_F *worldTransform, BOOL *contains ) const  = 0;

	virtual HRESULT	FillContainsPoint(D2D1_POINT_2F point, const D2D1_MATRIX_3X2_F *worldTransform,
		BOOL *contains ) const = 0;


	virtual HRESULT	CompareWithGeometry(ID2D1Geometry *inputGeometry, const D2D1_MATRIX_3X2_F *inputGeometryTransform,
		D2D1_GEOMETRY_RELATION *relation ) const = 0;

	virtual HRESULT	Simplify(D2D1_GEOMETRY_SIMPLIFICATION_OPTION simplificationOption,
		const D2D1_MATRIX_3X2_F *worldTransform, ID2D1SimplifiedGeometrySink *geometrySink 
		) const = 0;
	
	virtual HRESULT	Tessellate( const D2D1_MATRIX_3X2_F *worldTransform, ID2D1TessellationSink *tessellationSink ) const = 0;
	
	
	virtual HRESULT	CombineWithGeometry(ID2D1Geometry *inputGeometry,
		D2D1_COMBINE_MODE combineMode, const D2D1_MATRIX_3X2_F *inputGeometryTransform,
		ID2D1SimplifiedGeometrySink *geometrySink ) const = 0;

	virtual HRESULT	Outline( const D2D1_MATRIX_3X2_F *worldTransform,
		ID2D1SimplifiedGeometrySink *geometrySink ) const = 0;
	
	
	virtual HRESULT	ComputeArea( const D2D1_MATRIX_3X2_F *worldTransform, FLOAT *area ) const = 0;
	
	virtual HRESULT	ComputeLength( const D2D1_MATRIX_3X2_F *worldTransform, FLOAT *length ) const = 0;
	
	virtual HRESULT ComputePointAtLength(
		FLOAT length, const D2D1_MATRIX_3X2_F *worldTransform, D2D1_POINT_2F *point,
		D2D1_POINT_2F *unitTangentVector ) const = 0;

	virtual HRESULT	Widen(FLOAT strokeWidth, ID2D1StrokeStyle *strokeStyle,
		const D2D1_MATRIX_3X2_F *worldTransform, ID2D1SimplifiedGeometrySink *geometrySink ) const = 0; 
}; 

class ID2D1RectangleGeometry : public ID2D1Geometry
{
public:
	virtual void GetRect( D2D1_RECT_F *rect ) const = 0;
}; 

class ID2D1RoundedRectangleGeometry : public ID2D1Geometry
{
public:
	virtual void GetRoundedRect(D2D1_ROUNDED_RECT *roundedRect ) const = 0;
}; 

class ID2D1EllipseGeometry : public ID2D1Geometry
{
public:
	virtual void GetEllipse(D2D1_ELLIPSE *ellipse ) const = 0;
};

class ID2D1GeometryGroup : public ID2D1Geometry
{
public:
	virtual D2D1_FILL_MODE GetFillMode() const =0;
	virtual UINT32 GetSourceGeometryCount() const =0;
	virtual void GetSourceGeometries(ID2D1Geometry **geometries, UINT geometriesCount) const =0;
}; 
class ID2D1TransformedGeometry  : public ID2D1Geometry
{
public:
	virtual void GetSourceGeometry( ID2D1Geometry **sourceGeometry ) = 0;
	virtual void GetTransform(D2D1_MATRIX_3X2_F *transform )= 0;
}; 

class ID2D1PathGeometry : public ID2D1Geometry
{
public:
	virtual HRESULT Open( ID2D1GeometrySink **geometrySink ) = 0;
	virtual HRESULT Stream(ID2D1GeometrySink *geometrySink ) const = 0;
	virtual HRESULT GetSegmentCount( UINT32 *count ) const = 0;
	virtual HRESULT GetFigureCount( UINT32 *count ) const = 0;
}; 
class ID2D1DrawingStateBlock  : public ID2D1Resource
{
public:
	virtual void GetDescription( D2D1_DRAWING_STATE_DESCRIPTION *stateDescription ) const= 0;
	virtual void SetDescription(D2D1_DRAWING_STATE_DESCRIPTION *stateDescription )= 0;
	virtual void SetTextRenderingParams(IDWriteRenderingParams *textRenderingParams = NULL )= 0;
	virtual void GetTextRenderingParams(IDWriteRenderingParams **textRenderingParams ) const = 0;
};
class ID2D1Bitmap  : public ID2D1Resource
{
public:
	virtual D2D1_SIZE_F GetSize() const = 0;
	virtual D2D1_SIZE_U GetPixelSize() const = 0;
	virtual D2D1_PIXEL_FORMAT GetPixelFormat() const = 0;
	virtual void GetDpi(FLOAT *dpiX, FLOAT *dpiY ) const = 0;
	virtual HRESULT CopyFromBitmap(const D2D1_POINT_2U *destPoint,
		ID2D1Bitmap *bitmap, const D2D1_RECT_U *srcRect ) = 0;
	virtual HRESULT CopyFromRenderTarget( const D2D1_POINT_2U *destPoint,
		ID2D1RenderTarget *renderTarget, const D2D1_RECT_U *srcRect) = 0;
	virtual HRESULT CopyFromMemory(const D2D1_RECT_U *dstRect, const void *srcData,
		UINT32 pitch ) = 0;
}; 

class ID2D1Brush  : public ID2D1Resource
{
public:
	virtual void SetOpacity(FLOAT opacity ) = 0;
	virtual void SetTransform(const D2D1_MATRIX_3X2_F *transform ) = 0;
	virtual FLOAT GetOpacity() const = 0;
	virtual void GetTransform(D2D1_MATRIX_3X2_F *transform) const = 0;
}; 
class ID2D1BitmapBrush : public ID2D1Brush
{
public:
	virtual void SetExtendModeX(D2D1_EXTEND_MODE extendModeX ) = 0;
	virtual void SetExtendModeY(D2D1_EXTEND_MODE extendModeY ) = 0;
	virtual void SetInterpolationMode(	D2D1_BITMAP_INTERPOLATION_MODE interpolationMode ) = 0;
	virtual void SetBitmap(ID2D1Bitmap *bitmap ) = 0;
	virtual D2D1_EXTEND_MODE GetExtendModeX() const = 0;
	virtual D2D1_EXTEND_MODE GetExtendModeY() const = 0;
	virtual D2D1_BITMAP_INTERPOLATION_MODE GetInterpolationMode() const = 0;
	virtual void GetBitmap(ID2D1Bitmap **bitmap ) const = 0;
}; 

class ID2D1SolidColorBrush  : public ID2D1Brush
{
public:
	virtual void SetColor(const D2D1_COLOR_F *color ) = 0;
	virtual D2D1_COLOR_F GetColor() const  = 0;
}; 

class ID2D1LinearGradientBrush  : public ID2D1Brush
{
public:
	virtual void SetStartPoint(D2D1_POINT_2F startPoint ) = 0;
	virtual void SetEndPoint(D2D1_POINT_2F endPoint ) = 0;
	virtual D2D1_POINT_2F GetStartPoint() const = 0;
	virtual D2D1_POINT_2F GetEndPoint() const = 0;
	virtual void GetGradientStopCollection(ID2D1GradientStopCollection **gradientStopCollection) const = 0;
}; 

class  ID2D1GradientStopCollection  : public ID2D1Resource
{
public:
	virtual UINT32 GetGradientStopCount() const = 0;
	virtual void GetGradientStops(D2D1_GRADIENT_STOP *gradientStops,
		UINT gradientStopsCount ) const = 0;
	virtual D2D1_GAMMA GetColorInterpolationGamma() const = 0;
	virtual D2D1_EXTEND_MODE GetExtendMode() const = 0;
};

class ID2D1Layer : public ID2D1Resource
{
public:
	virtual D2D1_SIZE_F GetSize() const = 0;
}; 

class ID2D1Mesh  : public ID2D1Resource
{
public:
	virtual HRESULT Open(ID2D1TessellationSink **tessellationSink) = 0;

};
class ID2D1RenderTarget;
class ID2D1BitmapRenderTarget;

class ID2D1RenderTarget : public ID2D1Resource
{
public:
	virtual HRESULT CreateBitmap(D2D1_SIZE_U size, const void *srcData,
		UINT32 pitch, const D2D1_BITMAP_PROPERTIES *bitmapProperties, ID2D1Bitmap **bitmap ) = 0;
	virtual HRESULT CreateBitmapFromWicBitmap(IWICBitmapSource *wicBitmapSource,
		const D2D1_BITMAP_PROPERTIES *bitmapProperties, ID2D1Bitmap **bitmap ) = 0;

	virtual HRESULT CreateSharedBitmap( REFIID riid,void *data, const D2D1_BITMAP_PROPERTIES *bitmapProperties,
		ID2D1Bitmap **bitmap ) = 0;

	virtual HRESULT CreateBitmapBrush( ID2D1Bitmap *bitmap,
		const D2D1_BITMAP_BRUSH_PROPERTIES *bitmapBrushProperties, const D2D1_BRUSH_PROPERTIES *brushProperties,
		ID2D1BitmapBrush **bitmapBrush ) = 0;

	virtual HRESULT CreateSolidColorBrush( const D2D1_COLOR_F *color,const D2D1_BRUSH_PROPERTIES *brushProperties,
		ID2D1SolidColorBrush **solidColorBrush ) = 0;

	virtual HRESULT CreateGradientStopCollection( const D2D1_GRADIENT_STOP *gradientStops,
		UINT gradientStopsCount, D2D1_GAMMA colorInterpolationGamma, D2D1_EXTEND_MODE extendMode,
		ID2D1GradientStopCollection **gradientStopCollection ) = 0;

	virtual HRESULT CreateLinearGradientBrush(const D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES *linearGradientBrushProperties,
		const D2D1_BRUSH_PROPERTIES *brushProperties, ID2D1GradientStopCollection *gradientStopCollection,
		ID2D1LinearGradientBrush **linearGradientBrush ) = 0;

	virtual HRESULT CreateRadialGradientBrush( const D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES *radialGradientBrushProperties,
		const D2D1_BRUSH_PROPERTIES *brushProperties, ID2D1GradientStopCollection *gradientStopCollection,
		ID2D1RadialGradientBrush **radialGradientBrush ) = 0;

	virtual HRESULT CreateCompatibleRenderTarget(const D2D1_SIZE_F *desiredSize,
		const D2D1_SIZE_U *desiredPixelSize, const D2D1_PIXEL_FORMAT *desiredFormat,
		D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS options, ID2D1BitmapRenderTarget **bitmapRenderTarget	) = 0;
	virtual HRESULT CreateLayer( const D2D1_SIZE_F *size, ID2D1Layer **layer ) = 0;
	virtual HRESULT CreateMesh(ID2D1Mesh **mesh ) = 0;

	virtual void DrawLine(D2D1_POINT_2F point0, D2D1_POINT_2F point1,
		ID2D1Brush *brush,	FLOAT strokeWidth = 1.0f, ID2D1StrokeStyle *strokeStyle = NULL ) = 0;

	virtual void DrawRectangle(const D2D1_RECT_F *rect, ID2D1Brush *brush,
		FLOAT strokeWidth = 1.0f, ID2D1StrokeStyle *strokeStyle = NULL ) = 0;

	virtual void FillRectangle(const D2D1_RECT_F *rect, ID2D1Brush *brush ) = 0;

	virtual void DrawRoundedRectangle(const D2D1_ROUNDED_RECT *roundedRect, ID2D1Brush *brush,
		FLOAT strokeWidth = 1.0f, ID2D1StrokeStyle *strokeStyle = NULL) = 0;	
	
	virtual void FillRoundedRectangle(const D2D1_ROUNDED_RECT *roundedRect, ID2D1Brush *brush ) = 0;

	virtual void DrawEllipse(const D2D1_ELLIPSE *ellipse, ID2D1Brush *brush,
		FLOAT strokeWidth = 1.0f, ID2D1StrokeStyle *strokeStyle = NULL ) = 0;

	virtual void FillEllipse(const D2D1_ELLIPSE *ellipse, ID2D1Brush *brush ) = 0;
	virtual void DrawGeometry(ID2D1Geometry *geometry, ID2D1Brush *brush, FLOAT strokeWidth = 1.0f,
		ID2D1StrokeStyle *strokeStyle = NULL ) = 0;

	virtual void FillGeometry(ID2D1Geometry *geometry, ID2D1Brush *brush, ID2D1Brush *opacityBrush = NULL ) = 0;

	virtual void FillMesh(ID2D1Mesh *mesh, ID2D1Brush *brush ) = 0;
	virtual void FillOpacityMask( ID2D1Bitmap *opacityMask, ID2D1Brush *brush,
		D2D1_OPACITY_MASK_CONTENT content, const D2D1_RECT_F *destinationRectangle = NULL,
		const D2D1_RECT_F *sourceRectangle = NULL ) = 0;

	virtual void DrawBitmap(ID2D1Bitmap *bitmap, const D2D1_RECT_F *destinationRectangle = NULL,
		FLOAT opacity = 1.0f, D2D1_BITMAP_INTERPOLATION_MODE interpolationMode = D2D1_BITMAP_INTERPOLATION_MODE_LINEAR,
		const D2D1_RECT_F *sourceRectangle = NULL ) = 0;

	virtual void DrawText(const WCHAR *string,
		UINT stringLength, IDWriteTextFormat *textFormat, const D2D1_RECT_F *layoutRect,
		ID2D1Brush *defaultForegroundBrush,	D2D1_DRAW_TEXT_OPTIONS options = D2D1_DRAW_TEXT_OPTIONS_NONE,
		DWRITE_MEASURING_MODE measuringMode = DWRITE_MEASURING_MODE_NATURAL ) = 0;

	virtual void DrawTextLayout(D2D1_POINT_2F origin,
		IDWriteTextLayout *textLayout, ID2D1Brush *defaultForegroundBrush,
		D2D1_DRAW_TEXT_OPTIONS options = D2D1_DRAW_TEXT_OPTIONS_NONE ) = 0;

	virtual void DrawGlyphRun(
		D2D1_POINT_2F baselineOrigin, const DWRITE_GLYPH_RUN *glyphRun,
		ID2D1Brush *foregroundBrush, DWRITE_MEASURING_MODE measuringMode = DWRITE_MEASURING_MODE_NATURAL ) = 0;

	virtual void SetTransform( const D2D1_MATRIX_3X2_F *transform ) = 0;
	virtual void GetTransform( D2D1_MATRIX_3X2_F *transform ) const = 0;
	virtual void SetAntialiasMode(D2D1_ANTIALIAS_MODE antialiasMode ) = 0;

	virtual D2D1_ANTIALIAS_MODE GetAntialiasMode() const = 0;

	virtual void SetTextAntialiasMode(D2D1_TEXT_ANTIALIAS_MODE textAntialiasMode ) = 0;

	virtual D2D1_TEXT_ANTIALIAS_MODE GetTextAntialiasMode() const = 0;

	virtual void SetTextRenderingParams(IDWriteRenderingParams *textRenderingParams = NULL ) = 0;
	virtual void GetTextRenderingParams(IDWriteRenderingParams **textRenderingParams) const = 0;

	virtual void SetTags(D2D1_TAG tag1,	D2D1_TAG tag2 ) = 0;
	virtual void GetTags( D2D1_TAG *tag1 = NULL, D2D1_TAG *tag2 = NULL ) const = 0;
	virtual void PushLayer( const D2D1_LAYER_PARAMETERS *layerParameters, ID2D1Layer *layer ) = 0;
	virtual void PopLayer() = 0;
	virtual HRESULT Flush(D2D1_TAG *tag1 = NULL, D2D1_TAG *tag2 = NULL ) = 0;
	virtual void SaveDrawingState( ID2D1DrawingStateBlock *drawingStateBlock ) const = 0;
	virtual void RestoreDrawingState( ID2D1DrawingStateBlock *drawingStateBlock ) = 0;
	virtual void PushAxisAlignedClip( const D2D1_RECT_F *clipRect,
		D2D1_ANTIALIAS_MODE antialiasMode ) = 0;

	virtual void PopAxisAlignedClip() = 0;

	virtual void Clear(const D2D1_COLOR_F *clearColor = NULL ) = 0;

	virtual void BeginDraw() = 0;
	virtual HRESULT EndDraw(D2D1_TAG *tag1 = NULL, D2D1_TAG *tag2 = NULL ) = 0;

	virtual D2D1_PIXEL_FORMAT GetPixelFormat() const = 0;

	virtual void SetDpi(FLOAT dpiX,	FLOAT dpiY ) = 0;
	virtual void GetDpi(FLOAT *dpiX, FLOAT *dpiY ) const = 0;
	virtual D2D1_SIZE_F GetSize() const = 0;
	virtual D2D1_SIZE_U GetPixelSize() const = 0;
	virtual UINT32 GetMaximumBitmapSize() const = 0;

	virtual BOOL IsSupported(const D2D1_RENDER_TARGET_PROPERTIES *renderTargetProperties ) const = 0;

	HRESULT	CreateBitmap(D2D1_SIZE_U size, const D2D1_BITMAP_PROPERTIES &bitmapProperties,
		ID2D1Bitmap **bitmap ) = 0;
	
	
	HRESULT	CreateBitmapFromWicBitmap( IWICBitmapSource *wicBitmapSource, ID2D1Bitmap **bitmap ); 
	HRESULT	CreateBitmapBrush(ID2D1Bitmap *bitmap, ID2D1BitmapBrush **bitmapBrush );

	HRESULT	CreateBitmapBrush(ID2D1Bitmap *bitmap, const D2D1_BITMAP_BRUSH_PROPERTIES &bitmapBrushProperties,
		ID2D1BitmapBrush **bitmapBrush );

	HRESULT	CreateSolidColorBrush(const D2D1_COLOR_F &color,ID2D1SolidColorBrush **solidColorBrush );
	
	HRESULT	CreateGradientStopCollection( const D2D1_GRADIENT_STOP *gradientStops,
		UINT gradientStopsCount, ID2D1GradientStopCollection **gradientStopCollection ) ;
	

	HRESULT	CreateLinearGradientBrush(const D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES &linearGradientBrushProperties,
		ID2D1GradientStopCollection *gradientStopCollection, ID2D1LinearGradientBrush **linearGradientBrush );

	HRESULT	CreateRadialGradientBrush(const D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES &radialGradientBrushProperties,
		ID2D1GradientStopCollection *gradientStopCollection, ID2D1RadialGradientBrush **radialGradientBrush ) ;

	HRESULT	CreateCompatibleRenderTarget(ID2D1BitmapRenderTarget **bitmapRenderTarget );
	HRESULT	CreateCompatibleRenderTarget(D2D1_SIZE_F desiredSize, ID2D1BitmapRenderTarget **bitmapRenderTarget ) ;

	HRESULT	CreateCompatibleRenderTarget(D2D1_SIZE_F desiredSize,
		D2D1_SIZE_U desiredPixelSize, ID2D1BitmapRenderTarget **bitmapRenderTarget ) ;

	HRESULT	CreateCompatibleRenderTarget(D2D1_SIZE_F desiredSize,
		D2D1_SIZE_U desiredPixelSize, D2D1_PIXEL_FORMAT desiredFormat,ID2D1BitmapRenderTarget **bitmapRenderTarget );
	
	HRESULT	CreateLayer( ID2D1Layer **layer );

}; 


class ID2D1BitmapRenderTarget : public ID2D1RenderTarget
{
public:
	virtual HRESULT GetBitmap(ID2D1Bitmap **bitmap) = 0;
};
class ID2D1HwndRenderTarget  : public ID2D1RenderTarget
{
public:
	virtual D2D1_WINDOW_STATE CheckWindowState() = 0;
	virtual HRESULT Resize(const D2D1_SIZE_U *pixelSize) = 0;
	virtual HWND GetHwnd() const = 0;
}; 
class ID2D1DCRenderTarget  : public ID2D1RenderTarget
{
public:
	virtual HRESULT BindDC(const HDC hDC, const RECT *pSubRect	) = 0;
}; 

class ID2D1Factory  : public IUnknown
{
public:
	virtual HRESULT ReloadSystemMetrics() = 0;
	virtual void GetDesktopDpi( FLOAT *dpiX, FLOAT *dpiY ) = 0;
	virtual HRESULT CreateRectangleGeometry(const D2D1_RECT_F *rectangle, ID2D1RectangleGeometry **rectangleGeometry) = 0;

	virtual HRESULT CreateRoundedRectangleGeometry( const D2D1_ROUNDED_RECT *roundedRectangle, ID2D1RoundedRectangleGeometry **roundedRectangleGeometry) = 0;
	virtual HRESULT CreateEllipseGeometry(const D2D1_ELLIPSE *ellipse, ID2D1EllipseGeometry **ellipseGeometry ) = 0;
	virtual HRESULT CreateGeometryGroup(D2D1_FILL_MODE fillMode, ID2D1Geometry **geometries,
		UINT geometriesCount, ID2D1GeometryGroup **geometryGroup ) = 0;

	virtual HRESULT CreateTransformedGeometry(ID2D1Geometry *sourceGeometry, const D2D1_MATRIX_3X2_F *transform,
		 ID2D1TransformedGeometry **transformedGeometry ) = 0;

	virtual HRESULT CreatePathGeometry( ID2D1PathGeometry **pathGeometry ) = 0;

	virtual HRESULT CreateStrokeStyle(const D2D1_STROKE_STYLE_PROPERTIES *strokeStyleProperties,
		const FLOAT *dashes, UINT dashesCount, ID2D1StrokeStyle **strokeStyle ) = 0;

	virtual HRESULT CreateDrawingStateBlock( const D2D1_DRAWING_STATE_DESCRIPTION *drawingStateDescription,
		IDWriteRenderingParams *textRenderingParams, ID2D1DrawingStateBlock **drawingStateBlock ) = 0;

	virtual HRESULT CreateWicBitmapRenderTarget(IWICBitmap *target,
		const D2D1_RENDER_TARGET_PROPERTIES *renderTargetProperties,
		ID2D1RenderTarget **renderTarget ) = 0;

	virtual HRESULT CreateHwndRenderTarget( const D2D1_RENDER_TARGET_PROPERTIES *renderTargetProperties,
		const D2D1_HWND_RENDER_TARGET_PROPERTIES *hwndRenderTargetProperties, ID2D1HwndRenderTarget **hwndRenderTarget 	) = 0;

	virtual HRESULT CreateDxgiSurfaceRenderTarget(IDXGISurface *dxgiSurface, const D2D1_RENDER_TARGET_PROPERTIES *renderTargetProperties,
		ID2D1RenderTarget **renderTarget ) = 0;

	virtual HRESULT CreateDCRenderTarget( const D2D1_RENDER_TARGET_PROPERTIES *renderTargetProperties,
		ID2D1DCRenderTarget **dcRenderTarget ) = 0;
	
	virtual HRESULT	CreateDrawingStateBlock(const D2D1_DRAWING_STATE_DESCRIPTION &drawingStateDescription,
		ID2D1DrawingStateBlock **drawingStateBlock ) = 0;

	virtual HRESULT	CreateDrawingStateBlock(ID2D1DrawingStateBlock **drawingStateBlock ) = 0;

}; 

class Matrix3x2F : public D2D1_MATRIX_3X2_F
{
public:
	Matrix3x2F(
		FLOAT _11,
		FLOAT _12,
		FLOAT _21,
		FLOAT _22,
		FLOAT _31,
		FLOAT _32
		) ;
	Matrix3x2F(	) ;
	static Matrix3x2F Identity();
	static Matrix3x2F Translation(	D2D1_SIZE_F size);
	static Matrix3x2F Translation(FLOAT x,FLOAT y);
	static Matrix3x2F Scale(D2D1_SIZE_F size, D2D1_POINT_2F center);
	static Matrix3x2F Scale(FLOAT x,FLOAT y, D2D1_POINT_2F center);
	static Matrix3x2F Rotation(	FLOAT angle, D2D1_POINT_2F center );
	static Matrix3x2F Skew(FLOAT angleX, FLOAT angleY, D2D1_POINT_2F center);
	static Matrix3x2F* ReinterpretBaseType(D2D1_MATRIX_3X2_F *pMatrix);
	FLOAT Determinant() const;
	bool IsInvertible() const;
	bool Invert();
	bool IsIdentity() const;
    void SetProduct(const Matrix3x2F &a, const Matrix3x2F &b);
	Matrix3x2F 	operator*(const Matrix3x2F &matrix) const;

	D2D1_POINT_2F TransformPoint(D2D1_POINT_2F point) const;
};


D2D1_POINT_2F Point2F(FLOAT x, FLOAT y);
D2D1_POINT_2U Point2U(UINT32 x, UINT32 y);
D2D1_SIZE_F SizeF( FLOAT width ,  FLOAT height);
	  
D2D1_SIZE_U SizeU( UINT32 width , UINT32 height );

D2D1_RECT_F RectF(FLOAT left, FLOAT top, FLOAT right, FLOAT bottom);

D2D1_RECT_U RectU(UINT32 left, UINT32 top, UINT32 right,  UINT32 bottom);

D2D1_RECT_F InfiniteRect();

D2D1_ARC_SEGMENT ArcSegment(D2D1_POINT_2F &point, D2D1_SIZE_F &size, FLOAT rotationAngle, D2D1_SWEEP_DIRECTION sweepDirection, D2D1_ARC_SIZE arcSize);

D2D1_BEZIER_SEGMENT BezierSegment( D2D1_POINT_2F &point1, D2D1_POINT_2F &point2, D2D1_POINT_2F &point3 );

D2D1_ELLIPSE Ellipse( D2D1_POINT_2F &center, FLOAT radiusX, FLOAT radiusY);
D2D1_ROUNDED_RECT RoundedRect(D2D1_RECT_F &rect, FLOAT radiusX,	FLOAT radiusY);

D2D1_BRUSH_PROPERTIES BrushProperties( FLOAT opacity, D2D1_MATRIX_3X2_F &transform);

D2D1_GRADIENT_STOP GradientStop(FLOAT position, D2D1_COLOR_F &color);

D2D1_QUADRATIC_BEZIER_SEGMENT QuadraticBezierSegment( D2D1_POINT_2F &point1, D2D1_POINT_2F &point2  );

D2D1_STROKE_STYLE_PROPERTIES StrokeStyleProperties(
					  D2D1_CAP_STYLE startCap = D2D1_CAP_STYLE_FLAT,
					  D2D1_CAP_STYLE endCap = D2D1_CAP_STYLE_FLAT,
					  D2D1_CAP_STYLE dashCap = D2D1_CAP_STYLE_FLAT,
					  D2D1_LINE_JOIN lineJoin = D2D1_LINE_JOIN_MITER,
					  FLOAT miterLimit = 10.0f,
					  D2D1_DASH_STYLE dashStyle = D2D1_DASH_STYLE_SOLID,
					  FLOAT dashOffset = 0.0f
					  );

D2D1_BITMAP_BRUSH_PROPERTIES
BitmapBrushProperties(
					  D2D1_EXTEND_MODE extendModeX = D2D1_EXTEND_MODE_CLAMP,
					  D2D1_EXTEND_MODE extendModeY = D2D1_EXTEND_MODE_CLAMP,
					  D2D1_BITMAP_INTERPOLATION_MODE interpolationMode = D2D1_BITMAP_INTERPOLATION_MODE_LINEAR
					  );



D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES
LinearGradientBrushProperties(D2D1_POINT_2F startPoint,D2D1_POINT_2F endPoint);

D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES RadialGradientBrushProperties(D2D1_POINT_2F center,
							  D2D1_POINT_2F gradientOriginOffset,  FLOAT radiusX, FLOAT radiusY );



D2D1_PIXEL_FORMAT PixelFormat( DXGI_FORMAT dxgiFormat = DXGI_FORMAT_UNKNOWN, D2D1_ALPHA_MODE alphaMode = D2D1_ALPHA_MODE_UNKNOWN);


D2D1_BITMAP_PROPERTIES BitmapProperties( D2D1_PIXEL_FORMAT pixelFormat, FLOAT dpiX = 96.0f,  FLOAT dpiY = 96.0f);
		

D2D1_RENDER_TARGET_PROPERTIES
RenderTargetProperties( D2D1_RENDER_TARGET_TYPE type, D2D1_PIXEL_FORMAT pixelFormat,
					   FLOAT dpiX = 0.0,
					   FLOAT dpiY = 0.0,
					   D2D1_RENDER_TARGET_USAGE usage = D2D1_RENDER_TARGET_USAGE_NONE,
					   D2D1_FEATURE_LEVEL  minLevel = D2D1_FEATURE_LEVEL_DEFAULT       
					   );



D2D1_HWND_RENDER_TARGET_PROPERTIES
HwndRenderTargetProperties( HWND hwnd, D2D1_SIZE_U pixelSize, D2D1_PRESENT_OPTIONS presentOptions = D2D1_PRESENT_OPTIONS_NONE );

D2D1_LAYER_PARAMETERS LayerParameters(D2D1_RECT_F contentBounds ,
				ID2D1Geometry *geometricMask,
				D2D1_ANTIALIAS_MODE maskAntialiasMode,
				D2D1_MATRIX_3X2_F maskTransform,
				FLOAT opacity,
				ID2D1Brush *opacityBrush,
				D2D1_LAYER_OPTIONS layerOptions);


D2D1_DRAWING_STATE_DESCRIPTION DrawingStateDescription(
						D2D1_ANTIALIAS_MODE antialiasMode,
						D2D1_TEXT_ANTIALIAS_MODE textAntialiasMode ,
						D2D1_TAG tag1,
						D2D1_TAG tag2,
						D2D1_MATRIX_3X2_F transform );

 
class ColorF : public D2D1_COLOR_F
{
public:
	enum Enum
	{
		AliceBlue = 0xF0F8FF,
		AntiqueWhite = 0xFAEBD7,
		Aqua = 0x00FFFF,
		Aquamarine = 0x7FFFD4,
		Azure = 0xF0FFFF,
		Beige = 0xF5F5DC,
		Bisque = 0xFFE4C4,
		Black = 0x000000,
		BlanchedAlmond = 0xFFEBCD,
		Blue = 0x0000FF,
		BlueViolet = 0x8A2BE2,
		Brown = 0xA52A2A,
		BurlyWood = 0xDEB887,
		CadetBlue = 0x5F9EA0,
		Chartreuse = 0x7FFF00,
		Chocolate = 0xD2691E,
		Coral = 0xFF7F50,
		CornflowerBlue = 0x6495ED,
		Cornsilk = 0xFFF8DC,
		Crimson = 0xDC143C,
		Cyan = 0x00FFFF,
		DarkBlue = 0x00008B,
		DarkCyan = 0x008B8B,
		DarkGoldenrod = 0xB8860B,
		DarkGray = 0xA9A9A9,
		DarkGreen = 0x006400,
		DarkKhaki = 0xBDB76B,
		DarkMagenta = 0x8B008B,
		DarkOliveGreen = 0x556B2F,
		DarkOrange = 0xFF8C00,
		DarkOrchid = 0x9932CC,
		DarkRed = 0x8B0000,
		DarkSalmon = 0xE9967A,
		DarkSeaGreen = 0x8FBC8F,
		DarkSlateBlue = 0x483D8B,
		DarkSlateGray = 0x2F4F4F,
		DarkTurquoise = 0x00CED1,
		DarkViolet = 0x9400D3,
		DeepPink = 0xFF1493,
		DeepSkyBlue = 0x00BFFF,
		DimGray = 0x696969,
		DodgerBlue = 0x1E90FF,
		Firebrick = 0xB22222,
		FloralWhite = 0xFFFAF0,
		ForestGreen = 0x228B22,
		Fuchsia = 0xFF00FF,
		Gainsboro = 0xDCDCDC,
		GhostWhite = 0xF8F8FF,
		Gold = 0xFFD700,
		Goldenrod = 0xDAA520,
		Gray = 0x808080,
		Green = 0x008000,
		GreenYellow = 0xADFF2F,
		Honeydew = 0xF0FFF0,
		HotPink = 0xFF69B4,
		IndianRed = 0xCD5C5C,
		Indigo = 0x4B0082,
		Ivory = 0xFFFFF0,
		Khaki = 0xF0E68C,
		Lavender = 0xE6E6FA,
		LavenderBlush = 0xFFF0F5,
		LawnGreen = 0x7CFC00,
		LemonChiffon = 0xFFFACD,
		LightBlue = 0xADD8E6,
		LightCoral = 0xF08080,
		LightCyan = 0xE0FFFF,
		LightGoldenrodYellow = 0xFAFAD2,
		LightGreen = 0x90EE90,
		LightGray = 0xD3D3D3,
		LightPink = 0xFFB6C1,
		LightSalmon = 0xFFA07A,
		LightSeaGreen = 0x20B2AA,
		LightSkyBlue = 0x87CEFA,
		LightSlateGray = 0x778899,
		LightSteelBlue = 0xB0C4DE,
		LightYellow = 0xFFFFE0,
		Lime = 0x00FF00,
		LimeGreen = 0x32CD32,
		Linen = 0xFAF0E6,
		Magenta = 0xFF00FF,
		Maroon = 0x800000,
		MediumAquamarine = 0x66CDAA,
		MediumBlue = 0x0000CD,
		MediumOrchid = 0xBA55D3,
		MediumPurple = 0x9370DB,
		MediumSeaGreen = 0x3CB371,
		MediumSlateBlue = 0x7B68EE,
		MediumSpringGreen = 0x00FA9A,
		MediumTurquoise = 0x48D1CC,
		MediumVioletRed = 0xC71585,
		MidnightBlue = 0x191970,
		MintCream = 0xF5FFFA,
		MistyRose = 0xFFE4E1,
		Moccasin = 0xFFE4B5,
		NavajoWhite = 0xFFDEAD,
		Navy = 0x000080,
		OldLace = 0xFDF5E6,
		Olive = 0x808000,
		OliveDrab = 0x6B8E23,
		Orange = 0xFFA500,
		OrangeRed = 0xFF4500,
		Orchid = 0xDA70D6,
		PaleGoldenrod = 0xEEE8AA,
		PaleGreen = 0x98FB98,
		PaleTurquoise = 0xAFEEEE,
		PaleVioletRed = 0xDB7093,
		PapayaWhip = 0xFFEFD5,
		PeachPuff = 0xFFDAB9,
		Peru = 0xCD853F,
		Pink = 0xFFC0CB,
		Plum = 0xDDA0DD,
		PowderBlue = 0xB0E0E6,
		Purple = 0x800080,
		Red = 0xFF0000,
		RosyBrown = 0xBC8F8F,
		RoyalBlue = 0x4169E1,
		SaddleBrown = 0x8B4513,
		Salmon = 0xFA8072,
		SandyBrown = 0xF4A460,
		SeaGreen = 0x2E8B57,
		SeaShell = 0xFFF5EE,
		Sienna = 0xA0522D,
		Silver = 0xC0C0C0,
		SkyBlue = 0x87CEEB,
		SlateBlue = 0x6A5ACD,
		SlateGray = 0x708090,
		Snow = 0xFFFAFA,
		SpringGreen = 0x00FF7F,
		SteelBlue = 0x4682B4,
		Tan = 0xD2B48C,
		Teal = 0x008080,
		Thistle = 0xD8BFD8,
		Tomato = 0xFF6347,
		Turquoise = 0x40E0D0,
		Violet = 0xEE82EE,
		Wheat = 0xF5DEB3,
		White = 0xFFFFFF,
		WhiteSmoke = 0xF5F5F5,
		Yellow = 0xFFFF00,
		YellowGreen = 0x9ACD32,
	};
		ColorF(
		UINT32 rgb,
		FLOAT a = 1.0
		);
	
		ColorF(
		Enum knownColor,
		FLOAT a = 1.0
		);
	
		ColorF(
		FLOAT r,
		FLOAT g,
		FLOAT b,
		FLOAT a = 1.0
		);
};

%rename(D2D1_POINT_2F_mul_D2D1_MATRIX_3x2F) operator*( D2D1_POINT_2F point,  D2D1_MATRIX_3X2_F matrix );
D2D1_MATRIX_3X2_F IdentityMatrix();

























#endif